module.exports = app => {
    const { router, controller } = app;
    
    router.post('/register',controller.user.register)
    router.post('/login',controller.user.login)
    
    router.get('/housing', controller.home.housing);
    router.delete('/housing/:id', controller.home.delHousing);
    router.post('/housing/add', controller.home.addHousing);
    router.put('/housing/edit', controller.home.editHousing);
    router.put('/housing/edit/type', controller.home.editType);
    
    router.get('/leases', controller.lease.leases);
    router.delete('/leases/:id', controller.lease.delLeases);
    router.post('/leases/add', controller.lease.addLeases);
    router.put('/leases/edit', controller.lease.editLeases);
    router.put('/leases/edit/type', controller.lease.editType);
    
    router.get('/group', controller.group.getGroup);
    router.delete('/group/:id', controller.group.delGroup);
    
    router.get('/order', controller.order.getOrder);
    router.delete('/order/:id', controller.order.delOrder);

    router.get('/ifmtion', controller.ifmtion.getIfmtion);
    router.delete('/ifmtion/:id', controller.ifmtion.delIfmtion);
    router.post('/ifmtion/add', controller.ifmtion.addIfmtion);
    router.put('/ifmtion/edit', controller.ifmtion.editIfmtion);
    router.put('/ifmtion/edit/type', controller.ifmtion.editType);

    router.get('/broker', controller.broker.getBroker);
    router.delete('/broker/:id', controller.broker.delBroker);
    router.post('/broker/add', controller.broker.addBroker);
    router.put('/broker/edit', controller.broker.editBroker);

    router.get('/audit', controller.audit.audit);
    router.delete('/audit/:id', controller.audit.delAudit);
    router.post('/audit/add', controller.audit.addAudit);
    router.put('/audit/edit', controller.audit.editAudit);

    // 直播
    router.get('/live', controller.live.getLiveList);
    router.delete('/live/:id', controller.live.delLiveList);
    router.put('/live/edit/type', controller.live.editType);
    router.get('/live/:id', controller.live.detailList);

};